<!DOCTYPE html>
<html class="bg">
<head>
	<title>国纸废检</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <script src="js/mui.js"></script>
    <script src="js/common.js" type="text/javascript" charset="utf-8"></script>
     
    <link href="css/mui.min.css" rel="stylesheet"/>
	<link href="css/common.css" rel="stylesheet"/>
	<link href="css/login.css" rel="stylesheet"/>
	<link rel="stylesheet" href="css/nicky.css" />
	<script src="js/jquery.min.js"></script>
	<script src="js/webdb.js"></script>
	
</head>
<body class="bg"> 
	<div class="mui-content bg">
		<div id="logo"><b>LOGO</b><i>LOGO</i></div>
		<div class="loginBox ac"> 
			<p>
				<input type="text" id="uid" value="abc" placeholder="用户名" />
				<input type="password" id="pwd" value="123456" placeholder="密码" />
			</p>
			<button class="nbtn" style="margin-top: 40px;" id="btnLogin">登 录</button></div>
		</div>
		<div class="dibu">玖龙（控股）有限公司</div>
<script>
mui.init();
//mui.plusReady(function(){
	$(function(){
	$('#btnLogin').on('click',function(e){
		var uid = $('#uid').val().trim();
		var pwd = $('#pwd').val().trim();
		if(uid.length<0){
			mui.toast('请输入用户名'); $('#uid').focus(); return false;
		}
		if(pwd.length<0){
			mui.toast('请输入密码');  $('#pwd').focus(); return false;
		}
		var where = {'ID':uid,'PWD':pwd};
		select('users',TBS.users,{where:where},function(dat){
			console.log(dat.item(0));
			if(dat.item(0)){
				dat = dat.item(0); 
				setSession("UID",dat.ID);
				setSession("UINFO",JSON.stringify(dat));
				mui.openWindow({ url:'gnxz.html' });
			}else{
				mui.toast('帐号或者密码错误');
			}
		});
	});
});
</script>
	</div>
</body>
</html>